Remove From Channel
AutomatR.Slack.Activities.RemoveFromChannel
The "Remove From Channel" activity in AutomatR is part of the Slack Channel activities package, utilizing the Slack API to remove a specified Slack user from an existing channel. This activity is designed for scenarios where you, as a member and administrator of the channel, need to manage the channel membership by removing a particular user.
Properties
Name | Description |
---|---|
Input | |
Channel Name | The name of the channel from which the user is to be removed. String variables containing the desired channel name. |
User Name | The name of the Slack user to be removed from the channel. String variables containing the desired user name. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variable or argument containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Remove From Channel" activity. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Result | Outputs a Boolean value indicating whether the user removal from the channel was successful. True indicates success, while False indicates failure. Variables of relevant types (e.g., Boolean variables) to store the operation result. |
How to use:
- Drag and drop the "Remove From Channel" activity onto the workflow.
- Configure the properties by specifying the channel name and user name.
- Optionally, configure the delay.
- Execute the workflow to remove the specified user from the channel.
Example: Consider an example where the "Remove From Channel" activity is used to remove a user named "john_doe" from the "General" channel:
Remove From Channel:
Delay: 2
Channel Name: "General"
User Name: "john_doe"
Result: removalResult
In this example, the activity attempts to remove the user "john_doe" from the "General" channel with a 2-second delay. The result of the operation (success or failure) is stored in the Boolean variable "removalResult" for further handling in the workflow.